﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace serva
{
	/// <summary>
	/// Lógica de interacción para Panel_Servicio.xaml
	/// </summary>
	public partial class Panel_Servicio : UserControl
	{
        public Servicio service;

        public Panel_Servicio()
        {
            this.InitializeComponent();
			ingredientes.ColumnWidth = 110;           
        }
            

        public void Load(Servicio serv)
        {
            tittle.Content = serv.Nombre;
            inicio.SelectedDate = serv.FechaInicio;
            fin.SelectedDate = serv.FechaFin;
            ingredientes.ItemsSource = serv.List_ingredients;
            subservicios.ItemsSource = serv.listSub;
            subservicios.DisplayMemberPath = "Nombre";
            lblCosto.Content = serv.Costo;
            lblPrecio.Content = serv.Precio;
            lblUtilidad.Content = serv.Utilidad;
            service = serv;
        }
	}
}